package com.example.demo2.service;

import com.example.demo2.bean.Goods;
import com.example.demo2.dao.GoodsDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsService {

    @Autowired
    GoodsDao dao;
    public List<Goods> list(){
        List<Goods> all = dao.findAll();
        return all;
    }

    public void deleteById(Integer id) {
        dao.deleteById(id);
    }
}
